using System;
using System.ComponentModel.DataAnnotations;

namespace AiPlatformAdmin.Api.DTOs;

public class DocumentDto
{
    public int Id { get; set; }
    public int KnowledgeBaseId { get; set; }
    public string FileName { get; set; } = string.Empty;
    public string FilePath { get; set; } = string.Empty;
    public long FileSize { get; set; }
    public string? FileType { get; set; }
    public string ChunkingMode { get; set; } = "fixed";
    public int? ChunkSize { get; set; }
    public int? ChunkOverlap { get; set; }
    public DateTime UploadedAt { get; set; }
    public DateTime UpdatedAt { get; set; }
}

public class CreateDocumentDto
{
    [Required]
    public int KnowledgeBaseId { get; set; }

    [Required]
    [MaxLength(500)]
    public string FileName { get; set; } = string.Empty;

    [Required]
    [MaxLength(1000)]
    public string FilePath { get; set; } = string.Empty;

    public long FileSize { get; set; }

    [MaxLength(100)]
    public string? FileType { get; set; }

    [MaxLength(50)]
    public string ChunkingMode { get; set; } = "fixed";

    public int? ChunkSize { get; set; }

    public int? ChunkOverlap { get; set; }
}

public class UpdateDocumentDto
{
    [MaxLength(500)]
    public string? FileName { get; set; }

    [MaxLength(50)]
    public string? ChunkingMode { get; set; }

    public int? ChunkSize { get; set; }

    public int? ChunkOverlap { get; set; }
}

